package com.input4hua.mediator;

import com.input4hua.mediator.mediator.Mediator;
import com.input4hua.mediator.mediator.MediatorImpl;
import com.input4hua.mediator.obj.ComObjImp1;
import com.input4hua.mediator.obj.ComObjImp2;

/**
 * Created by jiahua.hu on 2019/2/23.
 */
public class Main {
    public static void main(String[] args) {
        Mediator mediator = new MediatorImpl();
        ComObjImp1 c1 = new ComObjImp1(mediator);
        ComObjImp2 c2 = new ComObjImp2(mediator);
        mediator.setCo1(c1);
        mediator.setCo2(c2);
        c1.depFoo();
    }
}
